The CxGrpTree object contains the following events:
Fired when the user selects a custom context menu item.
CxGrpTreeCtrl_EventContextMenu(EventId As String)
| Parameter | Required | Description |
|---|---|---|
|
EventId |
Yes |
Identifier of the menu item selected by the user. |
Example
The following example handles each context menu item. This example is taken from CxGrpTree Example.
|
Sub CxGrpTree_EventContextMenu(EventID) Dim This : Set This = CxGrpTree
If EventID = "EVENT_EXPAND" Then CxGrpTree.Expand False Elseif EventID = "EVENT_COLLAPSE" Then CxGrpTree.Collapse False Elseif EventID = "EVENT_REFRESH" Then CxGrpTree.Refresh End If
End Sub |
Fired when the user changes the selected node.
CxGrpTreeCtrl_EventOnSelChange()
Example
The following example displays attributes of the selected node. This example is taken from CxGrpTree Example.
|
Sub CxGrpTree_EventOnSelChange() Dim This : Set This = CxGrpTree
Dim strMsg strMsg = "Details for node " + CxGrpTree.GetSelectedNodeAttrValue("~nodeid") strMsg = strMsg + vbCrlf + vbCrlf
strMsg = strMsg + "Description: " + CxGrpTree.GetSelectedNodeAttrValue("~desc") strMsg = strMsg + vbCrlf
strMsg = strMsg + "Category: " + CxGrpTree.GetSelectedNodeAttrValue("~cat") strMsg = strMsg + vbCrlf
strMsg = strMsg + "Type: " + CxGrpTree.GetSelectedNodeAttrValue("~type") strMsg = strMsg + vbCrlf
strMsg = strMsg + "# of Children: " + _CStr(CxGrpTree.GetSelectedNodeChildCount())
eboDetails.Text = strMsg
End Sub |